home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu / macros05.arc / EXAMPLE.S next >
Text File  |  1990-05-16  |  980b  |  39 lines

  1.          ORG      $50          ! Data segment MUST start at low memory!
  2. TOTAL    RMB      2
  3. RTABLE   RMB      5
  4.          INCLUDE  MACROS05.MAC
  5. *
  6.          ORG      $400         ! Start code segment.
  7. RESET    RSP
  8.          MOVE     #,.RAMSBR$,#,RAMSBR$,#,RAMSZ$  ! Init ram.
  9. START    EQU      *
  10. *  <<replace example instruction code below with YOUR program>>
  11.          MOV.W    #,0,TOTAL
  12.          LDD      COST
  13.          ADDD     #,1000
  14.          SUBD     #,ADJUST
  15.          ADDD     TOTAL
  16.          STDD     TOTAL
  17.          CPD      #,1500
  18.          BEQ      MATCH
  19. *
  20.          LDXR     #,0
  21.          LDYR     #,0
  22. LOOP     LDAXY    TABLE,XREG
  23.          STAXY    RTABLE,YREG
  24.          INCXR
  25.          INCYR
  26.          CPY      #,5
  27.          BNE      LOOP
  28. *
  29. *  <<place rest of instruction code here>>
  30. *
  31.          INCLUDE  RAMSBR.INI
  32. TABLE    FCB      1,2,3,4,5
  33. ADJUST   FDB      150
  34. COST     FDB      859
  35. *
  36. *  <<place rest of data constants here>>
  37. *
  38.          END
  39.